   function Window_W(){
        var W_window = $(".us_sheet_ves").width();
        $(".us_sheet").width(W_window-120);
      }
      Window_W();

      $(window).on("resize",function(){
        Window_W();
      });
   
   $('.form_inquire').mouseleave(function(){
          $(".form-groupar_ul").slideUp();
       });

      $(".form-control").on('click', function() {
        $(".form-groupar_ul").slideUp();
        $(this).parents(".form-groupar").find('ul').slideDown();
      })

      $(".caret_vessel").click(function(){
        $(".form-groupar_ul").slideUp();
        $(this).parents(".form-groupar").find('ul').slideDown();
      })

      $(".form-groupar_ul li").click(function(){
        var x = $(this).text();
        $(this).parents(".form-groupar").find(".form-control").val(x);
        $(this).parents("ul").slideUp();
      })
	$('.button-groupar').mouseleave(function(){
          $(".button-groupar_ul").slideUp();
       });
			$(".button-control").on("click",function(){
				$(".button-groupar_ul").slideUp();
				$(this).parents(".button-groupar").find('ul').slideDown();
			})
			$(".button_caret_vessel").click(function(){
				$(".button-groupar_ul").slideUp();
				$(this).parents(".button-groupar").find('ul').slideDown();
			})
			$(".button-groupar_ul li").click(function(){
        var x = $(this).html();
        $(this).parents(".button-groupar").find(".button-control").html(x);
        $(this).parents("ul").slideUp();
      })
	//			默认显示
			var htmls=$(".button-groupar_ul li").eq(0).html();
			$(".button-groupar_ul li").parents(".button-groupar").find(".button-control").html(htmls);
       function dow(obj){
        var DowW = parseInt(obj.width()); 
        var DowWl = parseInt(obj.find('.form-groupal').width());
        obj.find('.form-groupar').width(DowW-DowWl-1);
        obj.find('.form-groupar').find('input').width(DowW-DowWl-27);
         obj.find('.form-groupar').find('textarea').width(DowW-DowWl-27);
      }

      dow($(".form-groupa"));
      dow($(".form-groupb"));

      $(window).on("resize",function(){
        dow($(".form-groupa"));
        dow($(".form-groupb"));
      });


      var arr =[];
      arr = $(".form-group");
      var xxx =1000;
      var len = arr.length;
      for(var i=0;i<len;i++){
        xxx--;
        $(arr[i]).css({"z-index":xxx});
      }

      /*
      function showexam(obj){
      var href = $(obj).data("src");
      var html = "<iframe id='frames' src='"+href+"'  style='position:absolute;width:100%;height:100%;top:0;left:0'/>";
      document.getElementById("contentbox").innerHTML = html;
    }
    */


      /*oSelect.onchange = function () { 
        var text=oSelect.options[oSelect.selectedIndex].text; 
        curSelect.innerHTML = text; 
      }*/
		  //默认时间
      Date.prototype.Format = function(fmt)   
{ //author: meizz   
  var o = {   
    "M+" : this.getMonth()+1,                 //月份   
    "d+" : this.getDate(),                    //日   
    "h+" : this.getHours(),                   //小时   
    "m+" : this.getMinutes(),                 //分   
    "s+" : this.getSeconds(),                 //秒   
    "q+" : Math.floor((this.getMonth()+3)/3), //季度   
    "S"  : this.getMilliseconds()             //毫秒   
  };   
  if(/(y+)/.test(fmt))   
    fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));   
  for(var k in o)   
    if(new RegExp("("+ k +")").test(fmt))   
  fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));   
  return fmt;   
} 
//var time1 = new Date().Format("yyyy-MM-dd hh:mm:ss");     
  
var time2 = new Date().Format("yyyy-MM-dd");  
 if(document.getElementById("c3")!=undefined){
 	document.getElementById("c3").value= time2;
 	document.getElementById("c4").value= time2;
 }
// 折叠
$(".btn-bucker").click(function(){
	$(".form-zhedie").slideUp();
	if($(this).children("img").attr("src")=="img/70.png"){
		$(this).children("img").attr("src","img/72.png");
		$(this).children("span").text("展开");
	}else{
		$(".form-zhedie").slideDown();
		$(this).children("img").attr("src","img/70.png");
		$(this).children("span").text("折叠");
	}
})